package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.api.oaflow.dto.SystemFlowRelationResultDto;
import com.glsc.ngateway.common.api.oaflow.dto.VITSystemOAFlowResourceDto;
import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow.FlowFormSystemNameApply;
import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow.FlowFormSystemNameModify;
import com.glsc.ngateway.common.base.domain.oracle.ecology.VITSystemOAFlowResource;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;


/**
 * @Author: zhengyr
 * @Date: 2023/08/15
 * @Desc: 系统关联流程domin到dto转换辅助类
 */
@Mapper(componentModel = "spring")
public interface SystemFlowRelationMapper {
    SystemFlowRelationMapper INSTANCE = Mappers.getMapper(SystemFlowRelationMapper.class);

    @Mapping(target = "processDefineKeyName", ignore = true)
    @Mapping(target = "flowFrom", ignore = true)
    @Mapping(target = "flowId", ignore = true)
    @Mapping(target = "processDefineKey", ignore = true)
    @Mapping(target = "children", ignore = true)
    SystemFlowRelationResultDto domain2dtoApply(FlowFormSystemNameApply domain);

    @Mapping(target = "processDefineKeyName", ignore = true)
    @Mapping(target = "flowFrom", ignore = true)
    @Mapping(target = "flowId", ignore = true)
    @Mapping(target = "processDefineKey", ignore = true)
    @Mapping(target = "children", ignore = true)
    SystemFlowRelationResultDto domain2dtoModify(FlowFormSystemNameModify domain);

    @Mapping(target = "processTitle", ignore = true)
    @Mapping(target = "processId", ignore = true)
    @Mapping(target = "processCreateTime", ignore = true)
    @Mapping(target = "flowCreateOperatorName", ignore = true)
    @Mapping(target = "processDefineKeyName", ignore = true)
    @Mapping(target = "flowFrom", ignore = true)
    @Mapping(target = "flowId", ignore = true)
    @Mapping(target = "processDefineKey", ignore = true)
    @Mapping(target = "children", ignore = true)
    @Mapping(target = "id", ignore = true)
    @Mapping(target = "createAccount", ignore = true)
    @Mapping(target = "updateAccount", ignore = true)
    SystemFlowRelationResultDto domain2dtoOAFlow(VITSystemOAFlowResource domain);

    @Mapping(target = "processTitle", ignore = true)
    @Mapping(target = "processId", ignore = true)
    @Mapping(target = "processCreateTime", ignore = true)
    @Mapping(target = "flowCreateOperatorName", ignore = true)
    @Mapping(target = "processDefineKeyName", ignore = true)
    @Mapping(target = "flowFrom", ignore = true)
    @Mapping(target = "flowId", ignore = true)
    @Mapping(target = "processDefineKey", ignore = true)
    @Mapping(target = "children", ignore = true)
    @Mapping(target = "id", ignore = true)
    @Mapping(target = "createAccount", ignore = true)
    @Mapping(target = "updateAccount", ignore = true)
    SystemFlowRelationResultDto domain2dtoOAFlow(VITSystemOAFlowResourceDto domain);
}
